﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="AlbumHinh.ascx.cs" Inherits="AlbumHinh" %>
<div class="MainFilter">
    <span class="headertext">Chuyên mục:</span>
    <asp:DropDownList ID="cmbAlbum" runat="server" Width="200px" 
        AutoPostBack="True"
        onselectedindexchanged="cmbAlbum_SelectedIndexChanged">
    </asp:DropDownList>
</div>
<asp:GridView ID="grvFileInfo" runat="server" AutoGenerateColumns="False" AllowPaging="True"
    PageSize="8" CssClass="adminlist" OnPageIndexChanging="grvFileInfo_PageIndexChanging">
    <Columns>
        <asp:TemplateField HeaderText="X&#243;a">
            <HeaderTemplate>
                <input id="chkAll" onclick="javascript:SelectAllCheckboxes(this);" type="checkbox" />
            </HeaderTemplate>
            <ItemTemplate>
                <input runat="server" id="chkSelect" value='<%# "?tabid=10&mod=" +  WebComponents.ConvertType.Encode(this.AddModule) + "&FileID=" + Eval("FileID") %>'
                    title='<%# Eval("FileID") %>' type="checkbox" />
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Center" Width="20px" />
            <HeaderStyle Width="20px" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="ID">
            <ItemTemplate>
                <asp:Label ID="lblFileID" runat="server" Text='<%# Eval("FileID") %>'></asp:Label>
            </ItemTemplate>
            <HeaderStyle Width="40px" />
            <ItemStyle HorizontalAlign="Center" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Tiêu đề">
            <ItemTemplate>
                <a href='?tabid=10&mod=<% = WebComponents.ConvertType.Encode(this.AddModule) %>&FileID=<%# Eval("FileID")  %>'>
                    <asp:Label ID="lblTitle" runat="server" Text='<%# Eval("Title") %>'></asp:Label>
                </a>
            </ItemTemplate>
            <HeaderStyle HorizontalAlign="Left" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Hình ảnh">
            <ItemTemplate>
                <a href='?mod=<% = WebComponents.ConvertType.Encode(this.AddModule) %>&FileID=<%# Eval("FileID")  %>'>
                    <img src="Image.ashx?FileUrl=../<%# Eval("FileUrl") %>&Size=70" />
                </a>
            </ItemTemplate>
            <HeaderStyle Width="70px" />
            <ItemStyle HorizontalAlign="Center" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="K&#237;ch thước">
            <ItemTemplate>
                <asp:Label ID="lblFileSize" runat="server" Text='<%# Eval("FileSize") %>'></asp:Label>
                kb
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Right" />
            <HeaderStyle Width="70px" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Kiểu">
            <ItemTemplate>
                <asp:Label ID="lblFileType" runat="server" Text='<%# Eval("FileType") %>'></asp:Label>
            </ItemTemplate>
            <HeaderStyle Width="70px" />
            <ItemStyle HorizontalAlign="Center" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Ng&#224;y tạo">
            <ItemTemplate>
                <asp:Label ID="lblAddedDate" runat="server" Text='<%# ((DateTime)Eval("AddedDate")).ToShortDateString() %>'></asp:Label>
            </ItemTemplate>
            <HeaderStyle Width="70px" />
            <ItemStyle HorizontalAlign="Center" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Vị tr&#237;" SortExpression="OrderId">
            <ItemTemplate>
                <asp:Label ID="lblOrderId" runat="server" Text='<%# Eval("OrderId") %>'></asp:Label>
            </ItemTemplate>
            <HeaderStyle Width="70px" />
            <ItemStyle HorizontalAlign="Center" />
        </asp:TemplateField>
    </Columns>
    <EmptyDataTemplate>
        <div align="center" id="EmptyData">
            Không có thông tin...</div>
    </EmptyDataTemplate>
    <RowStyle CssClass="row0" />
    <AlternatingRowStyle CssClass="row1" />
</asp:GridView>
